/**
 * 
 */
package com.myBase.core.entity;

import java.util.Date;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.myBase.common.persistence.BaseEntity;

/**
 * 金币订单Entity
 * @author gebao
 * @version 2017-05-04
 */
public class GoldcoinOrder extends BaseEntity<GoldcoinOrder> {

    private static final long serialVersionUID = 1L;

    private String orderid; // 订单号

    private String branchid; // 多系统支持（易贷msyidai）

    private String subchannel; // 渠道来源

    private String orderStatus; // 订单状态，00-初始化，01-处理中，02-成功，03-失败

    private Date tradetime; // 交易时间

    private String tradetype; // 00-使用，01-发放

    private String goldcoinsum; // 交易金币数量

    private String userid; // 易贷/转赚中用户id
    
    private String goldCoinId;//goldcoin表id
    private String remarks;

    public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
    public GoldcoinOrder() {
        super();
    }

    @Length(min = 1, max = 32, message = "订单号长度必须介于 1 和 32 之间")
    public String getOrderid() {
        return orderid;
    }

    public void setOrderid(String orderid) {
        this.orderid = orderid;
    }

    @Length(min = 0, max = 50, message = "渠道来源长度必须介于 0 和 50 之间")
    public String getSubchannel() {
        return subchannel;
    }

    public void setSubchannel(String subchannel) {
        this.subchannel = subchannel;
    }

    @Length(min = 1, max = 2, message = "订单状态，00-初始化，01-处理中，02-成功，03-失败长度必须介于 1 和 2 之间")
    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "交易时间不能为空")
    public Date getTradetime() {
        return tradetime;
    }

    public void setTradetime(Date tradetime) {
        this.tradetime = tradetime;
    }

    @Length(min = 1, max = 2, message = "00-使用，01-发放长度必须介于 1 和 2 之间")
    public String getTradetype() {
        return tradetype;
    }

    public void setTradetype(String tradetype) {
        this.tradetype = tradetype;
    }

    @Length(min = 1, max = 8, message = "交易金币数量长度必须介于 1 和 8 之间")
    public String getGoldcoinsum() {
        return goldcoinsum;
    }

    public void setGoldcoinsum(String goldcoinsum) {
        this.goldcoinsum = goldcoinsum;
    }

    @Length(min = 1, max = 8, message = "易贷/转赚中用户id长度必须介于 1 和 8 之间")
    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getBranchid() {
        return branchid;
    }

    public void setBranchid(String branchid) {
        this.branchid = branchid;
    }

	public String getGoldCoinId() {
		return goldCoinId;
	}

	public void setGoldCoinId(String goldCoinId) {
		this.goldCoinId = goldCoinId;
	}
    
    

}